package com.sand;

import java.time.LocalDateTime;
import java.util.Date;

//生成标记
public class SignUtils {

    /**
     * 尾号后4位+时间:   例如( 李 1234 05 05 12 12 12 12)
     */

    public static void main(String[] args) {

        String sign = SignUtils.sign("12345678910");

        System.out.println(sign);

    }


    public static String sign(String phone){
        //获取手机号后4位
        phone =  phone.substring(phone.length() - 4);

        //当前时间
        LocalDateTime now = LocalDateTime.now();

        //年
        int year = now.getYear();

        //月
        int monthValue = now.getMonthValue();

        //日
        int dayOfMonth = now.getDayOfMonth();

        //时
        int hour = now.getHour();

        //分
        int minute = now.getMinute();

        //秒
        int second = now.getSecond();


        return phone + year + monthValue + dayOfMonth + hour + minute + second;
    }









}
